package com.newgrand.controller;

import com.newgrand.domain.model.I8ReturnModel;
import com.newgrand.service.StatAmountService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @创建人：ZhaoFengjie
 * @修改人：ZhaoFengjie
 * @创建时间：18:37 2022/10/17
 * @修改时间:：18:37 2022/10/17
 */
@Api(tags = "统计年、月完成产值数据")
@RequestMapping("/StatAmount")
@RestController
public class StatAmountController {

    @Resource
    private StatAmountService statAmountService;

    @ApiOperation(value = "统计年、月完成产值数据获取接口", notes = "统计年、月完成产值数据获取接口", produces = "application/json")
    @RequestMapping(value = "/GetDataByOrgId", method = RequestMethod.GET)
    I8ReturnModel getDataByOrgId(String orgId) {
        return statAmountService.getDataByOrgId(orgId);
    }

    @ApiOperation(value = "统计年、月完成产值数据保存接口", notes = "统计年、月完成产值数据保存接口", produces = "application/json")
    @RequestMapping(value = "/SaveDataByOrgId", method = RequestMethod.GET)
    I8ReturnModel saveDataByOrgId(String orgId) {
        return statAmountService.saveDataByOrgId(orgId);
    }
}
